Position

data class Position(val contextInput: ContextInput, val mX: Int, val mY: Int, val x: Int, val y: Int, val width: Int, val height: Int, val screenWidth: Int, val screenHeight: Int)

Position context information for context handling. Includes information about the screen, mouse, and scoped context area. This scoped context initially is the same as screen context (i.e. x: 0, y: 0, w: screenW, h: screenH), but can be updated with proper scoped information as handling moved downstream. For example if handling moves to a widget, it can update xy and wh with it's xy position and width/height.

Author

fzzyhmstrs

Since

0.6.0

Parameters

contextInput

ContextInput the type of input relevant to this context event

mX

current mouse X position in pixels

mY

current mouse Y position in pixels

x

scoped X position. Downstream handlers should update this with their scoped position as needed.

y

scoped Y position. Downstream handlers should update this with their scoped position as needed.

screenWidth

current screen width in pixels

screenHeight

current screen height in pixels

Constructors

Link copied to clipboard
constructor(contextInput: ContextInput, mX: Int, mY: Int, x: Int, y: Int, width: Int, height: Int, screenWidth: Int, screenHeight: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val height: Int
Link copied to clipboard
val mX: Int
Link copied to clipboard
val mY: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val width: Int
Link copied to clipboard
val x: Int
Link copied to clipboard
val y: Int